﻿@model Day22EF.Models.CreateHeroViewModel
@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

@using(Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div>@Html.LabelFor(m => m.HeroName)</div>
    <div>@Html.TextBoxFor(m => m.HeroName)</div>
    <div>@Html.LabelFor(m => m.PowerName)</div>
    <div>@Html.TextBoxFor(m => m.PowerName)</div>
    
    <div>@Html.LabelFor(m => m.SelectedPowerTypeId)</div>
    <div>@Html.DropDownListFor(m => m.SelectedPowerTypeId, new SelectList(Model.PowerTypes, "PowerTypeId", "Name"))</div>
    <br />
    <div><input type="submit" value="Create" /></div>
}